
#include <BTextEdit>
#include <BClass>
#include <BScript>

#include "ClassConsole.h"

bool console_create(int argc, BVariant* argv)
{
	BClass* self = argv[0];
	return true;
}
bool console_output(int argc, BVariant* argv)
{
	BClass* self = argv[0];
	const BVariant* board = self->variant("board");
	BTextEdit* textEdit = board->value();
	if (!textEdit)
	{
		argv[0].setName("console.border is empty.");
		return false;
	}
	const BString& text = argv[1].value();
	textEdit->addText(text);
	textEdit->addText('\n');
	return true;
}
